<!--
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2023-03-15 21:07:15
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2023-03-15 21:24:30
 * @FilePath: \从0到1的楷楷\从0到1的楷楷\pink系列\Javasritp\第一天\js\作业\银行卡余额案例.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h2 {
            text-align: center;
        }

        table,
        th,
        td {
            margin: auto;
            text-align: center;
            border: 2px solid black;
            border-collapse: collapse;
            padding: 20px 30px;
        }
    </style>
</head>

<body>
    <h2>2023年12月消费支出</h2>

    <script>
        let yue=+prompt("请输入金额")
        let dian=+prompt("请输入电费")
        let shui=+prompt("请输入水费")
        let wang=+prompt("请输入网费")
        let money=yue-(dian+shui+wang)
        document.write(`
            <table>
        <tr>
            <th>银行卡余额</th>
            <th>电费</th>
            <th>水费</th>
            <th>网费</th>
            <th>银行卡余额</th>
        </tr>
        <tr>
            <td>${yue}</td>
            <td>${dian}</td>
            <td>${shui}</td>
            <td>${wang}</td>
            <td>${money}</td>
        </tr>
    </table>
        `)
    </script>
</body>

</html>